Fix #584 text-shadow with multiple values#1019
Conversation
|
@jwang1919 so I think we might be at a point where we should just contribute a fix upstream to I would lean in that direction because PrettyCSS itself has a full tokenizer and lexer built in, so adding support for a given syntactic construct is much more robust and expressive than trying to work around a parser error using regular expressions. (I admit to being a little lost looking at the regexps you introduce here, and I consider myself reasonably competent with regexps). WDYT? |
|
@outoftime Yeah that sounds like a better option to me as well. The regexp was a difficult come up with, but not too hard to interpret. |
|
@jwang1919 gotcha. yeah I’ve only worked with lookaheads a couple times, that’s what threw me off. FWIW, we don’t necessarily need to wait for PrettyCSS to integrate your patch—we could temporarily target https://github.com/popcodeorg/PrettyCSS (which I think I did in the past while waiting for PRs to get merged) |
|
Okay, made the changes and submitted PRs to both the original branch and the popcode fork. Once those are dealt with, I can change this branch's code. |
d7ef859 to
75e4f2a
Compare
75e4f2a to
d1c0731
Compare
|
@outoftime When possible, please review again. I have pushed the fix onto the PrettyCSS library (the maintainer merged it pretty quickly) and I've updated the PrettyCSS library. |
outoftime
left a comment
There was a problem hiding this comment.
Sick!! Awesome work on the upstream PR!
Fixes bug #584
Gave commas between CSS parenthesis statements like
rgbaleeway in the PrettyCSS validation.I found that doing so inadvertently created another bug where multiple commas would flag as valid. I added another check to deal with this as well as added the requisite validations in the test case.